package cn.livingCloud.entity.core;

import cn.livingCloud.context.BeanProvider;
import cn.livingCloud.repository.DeptMapper;
import cn.livingCloud.utils.UuidGenerator;

/**
 * 报表规则
 * Created by 唐旭 on 2016/6/27.
 */
public class ReportRule extends BaseEntity {
    private transient DeptMapper deptMapper = BeanProvider.getBean(DeptMapper.class);
    private String uuid = UuidGenerator.generate();
    //sql
    private String sql;
    private String name;
    //解析内容
    private String content;
    //所属部门
    private String deptUuid;

    public ReportRule() {
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getSql() {
        return sql;
    }

    public void setSql(String sql) {
        this.sql = sql;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getDeptUuid() {
        return deptUuid;
    }

    public void setDeptUuid(String deptUuid) {
        this.deptUuid = deptUuid;
    }

    public Dept getDept() {
        return deptMapper.selectByPrimaryKey(deptUuid);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
